package com.jie.other.compose.study03

import androidx.compose.foundation.layout.padding
import androidx.compose.material.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import com.jie.other.R
import com.jie.other.compose.data.TaskItemDTO
import com.jie.other.ui.widget.CommonTopAppBar

@Composable
fun Study03Page(
    taskList: List<TaskItemDTO>,
    addTaskClick: () -> Unit,
    onClearClick : () -> Unit,
    onCloseTask : (TaskItemDTO) -> Unit,
    backClick: () -> Unit = {},
) {
    Scaffold (
        topBar = {
            CommonTopAppBar(
                title = stringResource(id = R.string.other_compose_study_03),
                backClick = backClick,
            )
        }
    ) {
        Study03Screen(
            taskList = taskList,
            addTaskClick = addTaskClick,
            onClearClick = onClearClick,
            onCloseTask = onCloseTask,
            modifier = Modifier.padding(it)
        )
    }
}